package com.dodo.videoEdit.ui.fragment;

import android.content.Intent;

import com.azhon.basic.base.BaseNoModelFragment;
import com.dodo.videoEdit.R;
import com.dodo.videoEdit.databinding.FragmentScreenSlidePageBinding;
import com.dodo.videoEdit.view.MainActivity;

import java.util.Objects;



public class PeasantMineFragment extends BaseNoModelFragment<FragmentScreenSlidePageBinding> {

    private String mTitle;
    private int colorId;
    public static PeasantMineFragment newInstance(String title , int colorId) {
        PeasantMineFragment sf = new PeasantMineFragment();
        sf.mTitle = title;
        sf.colorId = colorId;
        return sf;
    }


    @Override
    protected int onCreate() {
        return R.layout.fragment_screen_slide_page;
    }

    @Override
    protected void initView() {
      }

    @Override
    protected void initData() {
        dataBinding.getRoot().setBackgroundColor(Objects.requireNonNull(getContext()).getResources().getColor(colorId));
        dataBinding.screenSlideTitle.setText(mTitle);
        dataBinding.screenSlideTitle.setOnClickListener(view->startActivity(new Intent(getContext(), MainActivity.class)));
    }

}
